<?php

namespace App\Http\Controllers\Community\Statuses;

use App\Http\Controllers\Controller;
use App\Http\Requests\Community\Statuses\StoreStatusesRequest;
use App\Models\Community\Status;
use StatusesUpdate;
class StatusesController extends Controller
{
    public function __construct()
    {
        $this->middleware('auth');
    }
    public function store(StoreStatusesRequest $request)
    {
        StatusesUpdate::statuses_store($request);
        return redirect()->back();
    }
    public function destroy(Status $status)
    {
        $this->authorize('destroy', $status);
        StatusesUpdate::destroy($status);
        return redirect()->back();
    }
}
